added isFull and isEmpty methods