new pfm implementation for lua script languages