changed if conditions