Added if and elseif statements