solving both problems listed in PROBLEMSWITHTRANSLATION.java