cleaning up and reordering