Changed type specification to be defined with passed in function context