isFull function written