some more work for #28
ermagad merge