added some manual sorting