adding torch/lua methods