move use strict to top
refactor sorting tests