Added ability for custom sort (dev defined)