minor change N->tmp