reorder functions to keep the byte-compiler happy