type annotation for good documentaion on "apply"