switch to temp array

fixes for jhay!