Made position into global var, automatic resorting of results