move sort switch to map