add :if option to result method