[TOM-298][TOM-300][TOM-301][TOM-302][TOM-303][TOM-304][TOM-306][TOM-307] new logic added in the code
Closes TOM-301