code optimisation for sprintboard sortable lock