implements part of #98