kept it like this for readability sake... anyway it's something that the could happen once in a few minutes, so the efficiency isn't THAT important ;)