improved overwriting