public boolean addProcess(SwapProcess proc)
    {
        SwapProcess tempProc = proc;
        int size = tempProc.getSize();
        int startIndex = 0,index = nextIndex;
        boolean added = false,firstLoop = false;;

        while(index < 100 && !added)
        {
            startIndex = nextHoleIndex(index);

            //check if the process will get out of bound
            if(startIndex + size > 100)
            {
                if(!firstLoop)
                {
                    index = 0;
                    firstLoop = true;
                }else{
                    index = 101;
                }
            }
            else
            {
                int endPoint = (startIndex + size);
                //check if the process is too big for the hole
                for(int i = startIndex ; i < endPoint; i++)
                {
                    if(!memorySpace[i].equalsIgnoreCase("."))
                    {
                        index = 200;
                        startIndex = i;
                        added = false;
                    }
                    if(index != 200)
                    {

                        added= true;

                    }
                }
            }
            index++;
        }


        if(added == true)
        {
            int endPoint = (startIndex+size);
            nextIndex = startIndex;
            for(int count = startIndex; count < endPoint; count++)
            {
                memorySpace[count] = tempProc.toString();
            }   
            activeProcess.add(tempProc);
        }

        

        return added;
    }