small change with if-loop