add tests for client-side code