Partial implementation of #13