adjust sub-function process()