some structure change
median done