Add main cacculation