modularized javascript