WIP: add unit tests