Replacing a conditional with a default parameter