basic mbatchd implementation