separate javascript into external file