first implementation, unit tests to come