refactoring of formula options