add initfeature and endfeature