Move implementation method out of the function