repackaging, added unit tests