結果 : set variable based on condition