WIP: added unit tests