added solution to problem number 18