adding further simplification, and function type