unit tests finalised