fix #1

switched to the ribbon code as recommended by benoit