This should be made a private method.