CON-2314 | avoiding using globals