error handling syntactically corrected, maybe