* bugfix: p1 and p2 have been overwritten each frame