Changed to external javascript file