added more logic to DealerController