add logs and remove unnecesary identity checks