skeleton for error handling