improve client side scripts