adding tests, fixing typos