add.java is the function which would be changed further