removed global _funs
added support for parameters