error handling from Damiano/dandresini