checked isFull and isEmpty