pre-merge graphs