modify raise logic