Added the calculations from index action to cal action as well