Implement the check out logic