reorder to put like vars together