fixed readme
added unit tests and some fixes