private int isAvailable(int begin, int end, int numPE, long startTime,
                            long endTime)
    {
        // if the required slot is empty or not occupied
        if (begin == NOT_FOUND) {
            return SUCCESS;
        }

        ARObject obj = null;
        long time = 0;        // a temp time
        int result = 0;

        // if the required slot only has 1 occupants or empty
        if (begin == end)
        {
            obj = (ARObject) reservList_.get(begin);

            // if the slot is empty
            if ( endTime < obj.getStartTime() ) {
                result = SUCCESS;
            }

            // determines the total PE of existing reservation + new one
            else if (obj.getNumPE() + numPE <= totalPE_) {
                result = SUCCESS;
            }
            else
            {
                // if no enough PE then approximates the busy time
                time = obj.getStartTime() +
                       (obj.getDurationTime()*MILLI_SEC) - startTime;
                result = approxBusyTime(time);
            }
        }

        // if the required slot involves more than 1 occupants
        else {
            result = calculateEmptySlot(begin, end, numPE, startTime);
        }

        return result;
    }