small changes based on JEM. more to follow