fix unnecessary temp variable