This should probably be a private method.