working in #8 exercise, done for night