extracted method