added solution to problem