modularized client side javascript