SSD3 Exercise6 answer, can be submitted directly