rebased MethodTask on FunctionTask