added calculate2 and calculate3