added a possible solution to 6, 1.c