modify end evet logic