finish implementation of #202