modified toString method to include "->" between elements and removed stuff related to iterator interface in main class.