finished functionality, updated tests, sorting remains