IF else Statements refactored