Little formula refactoring