first problem answered but not refactored