This method is a bit unreadable, please extract each step into helper methods and use shorter variable names, "internalImplementation" for instance could be just "impl" and add some whitespace between things.