made if statement more clear