added solutions to problems 8-10, non-generalized code..