public int doActionRejectFriends(DB db, int threadid, StringBuilder updateLog,StringBuilder readLog, int seqID, HashMap<String, Integer> friendshipInfo
			,HashMap<String, Integer> pendingInfo, int thinkTime,  boolean insertImage, boolean warmup)
	{
		int numOpsDone = 0;
		int keyname = buildKeyName(usercount);
		keyname = activateUser(keyname);
		if(keyname == -1)
			return 0;
		incrUserRef(keyname);
		if(!warmup){
			int auserid = -1;
			Vector<Integer> ids =pendingFrnds[memberIdxs.get(keyname)];
			if(ids.size() > 0){
				auserid = ids.get(ids.size()-1);
				int ret = 0;			
				long startUpdatea = System.nanoTime();
				ret = db.rejectFriend(auserid, keyname);
				if(ret < 0){
					System.out.println("There is an exception in rejectFriend.");
					System.exit(0);
				}
				//remove from the list coz it has been rejected
				ids.remove(ids.size()-1);
				
				int numPendingsForThisUserTillNow = 0;
				if(pendingInfo.get(Integer.toString(keyname))!= null){
					numPendingsForThisUserTillNow = pendingInfo.get(Integer.toString(keyname));
				}
				pendingInfo.put(Integer.toString(keyname), (numPendingsForThisUserTillNow-1));
				
				long endUpdatea = System.nanoTime();
				numOpsDone++;
				if(enableLogging){
					updateLog.append("UPDATE,PENDFRND,"+seqID+","+threadid+","+keyname+","+startUpdatea+","+endUpdatea+","+(numPendingsForThisUserTillNow-1)+",D"+"\n");
					updatesExist = true;
				}
				deRelateUsers(keyname, auserid );
			}
		}
		deactivateUser(keyname);
		return numOpsDone;
	}