add proper sorting to sections