Added simple p3 solution in js