Alternative rollup implementation for the rust branch

This is an alternative implementation of #46.
I've applied it!