added a general batch convertor