moving from text to js file