added (basic) client-side input checks