working pdr-c.js