implemented todo features 5 and 8, also made bugfixes