completed code that will allow a single agent to render client side