make max bn sync error a parameter
saving matdata in bcontrol