add capacity property
fix dispose implementation