extracting functions and prefixing them with __ for private