finished extra credit on exervise 7