Change markv calling convention to take a single array containing