merge-g imple and tests