added testing methods and edit js