Tried both solutions, and sadly neither of them work. What I forgot to say earlier is that pm is a global variable.
And I did see matty's thread earlier, but I have no idea whatsoever what to do with that code. Seems too complicated to me, I'm just a humble newbie
.