wrote tests and updated readme.