implemented #848