added batch option