updated readme and improved the test functions