Fix bugs
Add capacity notion