updated to lua 5.2 API