beginnings for error handling