headers: refactored each function into a data_post hook