Can you move this to either a separate function like before or inline into the function where it is used.  This should not be included all of the time but only when needed