Alternative rollup implementation for the rust branch

This is an alternative implementation of #46.
This is fine as is, thanks.