better ring algorithms