.......PS. [ZBX-3336] refactored the new code