most recent code changes to fix various things