first working version of p3