added batch processor to main code, getting error, needs fix