misc code changes