A few LUA functions I find useful in my programms