big rewrite to avoid mutating the original object
adding positive test cases
added content to readme
version bump