refactoring, added testing of invalid bulk request