changed func and jfunc definitions