added roughly tested batch api controller