create predict function on initialization