some CF algorithms