added some comments on allocation