added predict method