begin implementation, add tests