Update lua code to pr2