Implemented the capacity functionality