some refactoring
added batch-exec