fixed minor typos, added more tests