Revert "migrate to R solution"

This reverts commit b10dec605a2b310f019d0e409dbcbe370d8cf8f5.