modified javascript file and fixed bugs