some convenience functions for LUA