function process data