breaking out into separate js file