CON-1284 move code a bit