Trying to adopt the solution from zucker & maas