reorder declarations for locality