removing hacky modification of locals