add a set of functions for type-inference