.......PS. [ZBX-8992] simplification of the code