added client-side support (untested)