added function support, needs testing