client side - use js objects