working sort, working on visualization