added __init__ with method to MethodTask
added __init__ with method to MethodVar