improved function support