...G....S. [ZBX-8736] improved parts of the code to reuse already obtained information