I tried logic like that but felt that separating it out made it clearer. Although part of the two cases is similar, they actually modify values differently, and one of the two cases can exit the function immediately after processing--  so by removing one IF statement, i'd need to add at least 2 more.