add predict method