DDC-1858 Added coverage to ticket. Functionality already implemented.
Fix DDC-2494
small optimization