modularize (client side)
Modify sample