working on block functions - refactoring for instance variables