print"testing sort" function check (a, f) f = f or function (x,y) return x