sortable function is implemented