removed empty else loop that was causing error