started adding tests
fixed some small copy/paste issues