worked on Wave.java