.......PS. [ZBX-3336] fuction optimize