simplifying and generalizing framework