implemented batch input mode