working triangle sorter with page
basic functionaity only