start error handling, check next function works