added more tests around results and fixed errors