handle function types