trying to fix if else