reorganizing and adding headers