private static void addTreasureChest(Scanner scanner,Grid grid){
		System.out.println("please provide a name for your treasure chest :");
		String chest = scanner.nextLine();
		while(chest==null||chest.equals("")){
			System.out.println("please provide a name for your treasure chest :");
			chest=scanner.nextLine();
		}
		System.out.println("please provide a position for your treasure chest ");
		System.out.println("please enter a row number row numbers start from 0 and should be less than "+grid.getRows()+" : ");
		int row = getRows(scanner);
		while(row==-1||row>grid.getRows()){
			System.out.println("please enter a valid row number.Row numbers start from 0 and is less than "+grid.getRows()+" :");
			row =getRows(scanner);
		}
		int col = getColumns(scanner);
		System.out.println("please enter the column you would like to position your treasure chest columns starts 1 and should be less than "+grid.getColumns()+" : ");
		while(col==-1||col>grid.getColumns()){
			System.out.println("please enter a valid column number. Column numbers start from 1 and is less than "+grid.getColumns());
			col=getColumns(scanner);
		}
		grid.addTreasureChest(new TreasureChest(chest), row, col);
		grid.displayGrid();
		System.out.println("would you like to add another treasure chest to the grid ? Y or N");
		String yn=addTreasure(scanner);
		while(!yn.trim().equalsIgnoreCase("Y")&&!yn.trim().equalsIgnoreCase("N")){
			System.out.println("enter Y or N :");
			yn = scanner.nextLine();
		}
		if(yn.trim().equalsIgnoreCase("Y")){
			addTreasureChest(scanner,grid);
		}else{
			TreasureChestCounter counter = new TreasureChestManager();
			System.out.println("**********Treasure maps nearby****************" );
			counter.displayTreasureChestNearby(grid);

			System.out.println("thank you for using the trasure map finder");

		}

	}