changed if clause