removed unnecessary else statements