added a if else with stress var