modified isFull() and getMax()