Median:

I get an error with my code with the following:

Oops, try again. median([6, 8, 12, 2, 23]) returned 6 instead of 8

When I run my code in idle, I get 8. I'm not sure what's wrong with it.

```
def median(lst):
newLst = sorted(lst)
if len(newLst) % 2 == 0:
middle = int(len(newLst) / 2)
x = newLst[middle]
y = newLst[middle - 1]
return (x + y) / 2.0
else:
med = int(len(newLst) / 2 - 0.5)
x = newLst[med]
return x
```