Added test code to pe7.js