minor refactoring of slice-with
update demo to use ricardo's stats overlay