Add methods for calculate func1 and func2.