update method for accessing js vars