refactoring to add cart summary