Helper.java for assignment 1