method for processing data