rings reduction code clean up