draft implementation of #12