reorder initializations to make -Wall -pedantic happy