solve pfactor