auto rib calculations