added next states check for resynthesis