first steps of implementing sorting