Removed redundant else
Reverted if for better readability