added api for max prediction