put js in its own .js - fix #7