calculate results func added