transformation app generalization and transform function for reuse with zelig.app