small memory improvement