switch to use abort instead or raise