more function

adding more functionality to the java script page