added some logic for auto growth