*modularized javascript code