tutorial part 5 - additional tests, refactoring