BNF stats tranlsation to pure lua