reorganize header
improve interface to process functions