mark vars readonly and local