make calculate recursive