Private method.