input sorting just about there