client handles requests