Modified javascript