implement p2js
minor cleanup for integration