excercise 1.3 with tests