generalizer to work in lazy fashion to improve performance