not sure what the second IF was for