REV: enhancement and error handling