Second attempt implementing #156