changed if statments.