posted refactoring using ||=