This can be done once after this "else" block instead of being repeated both in the "if" and the "else".