v0.2 unit testing finalised