halfway to adding sorting