remove modulo, minor progress in refractoring