beginning client-side logic