[Refactoring] Completed bag example