corrected some code removed a condition