add predict logic