The code that I wrote compiles fine, but it tells me the calculation of the median is messed up. I can't figure out what I've done wrong in terms of how the median is calculated--does anyone see something that I don't???

```
def median(lst):
sorted([lst])
for numbers in lst:
if len(lst) % 2:
mid = (len(lst) / 2)
next_mid = mid - 1
middle = (int(lst[mid]) + int(lst[next_mid])) / 2.0
return middle
elif len(lst) == 1:
return lst([0])
else:
midodd = len(lst) / 2
return lst[midodd - 1]
median([2, 3, 1, 4])
```

Oops, try again.

median([4, 5, 5, 4]) returned 5 instead of 4.5