bunch of changes inspired by studies of fNML