building lua factory