refactored word using ngRepeat