This is a bit confusing. Might be better (for readability and understanding) to use two different functions for this instead of the bool parameter.