DC/Ajay | #3947 | refactoring and added ut