remove tmp at end