added a readme and a test and fixed a couple minor things