just rearranging declarations and comments