Refactored to set default capacity