Added ability for sorting