solved/refactored reverse_words