fix if bug. implemented set