Solution for unit 5.1.2