Added lua implementation