algorithm userBased c.d