implemented merge check