where using id in algo