minor changes before adding threads