refactor display formula from list of strings to class