The name isn't great...using two functions would be ok..I think I implemented it this way since this way (essentially duplicated) if/elses weren't required below.  I'd be ok changing it to two functions - I don't have a strong preference.