trying to alter js for add more fnctnlty