moved lua wrapper into a seperate source file