adding a client-side hook, closes #2159