fixed bug in replacement calculation and added Ted Turocy's register