added a return on error