started implementing type ordering