what's wrong with my code here, please help.

```
def median(numbers):
sorted(numbers)
for number in numbers:
if (len(numbers)) % 2 != 0:
position = ((len(numbers) + 1) // 2 )
median = numbers[position]
else:
position1 = ((len(numbers))//2)
position2 = ((len(numbers))//2 + 1)
median = (numbers[position1] + numbers[position2])//2
return median
```