type functions