draft: map functions and use their return type for injection