done sort with middle usage
doing middle sorting