handle function type