fixed y min and ordering