refactoring after immutable branch been merged