minor memory optimization