added 3rd condition, moved it on top of the OR condition due to conflict