cleaned up layout and sorting fixed

sorting only works with 3 numbers