Drain pinto beans and reserve the liquid. Over a medium heat in a heavy skillet heat the oil. Add beans and stir with a potato masher until they are heated throughout. Add salt, pepper and sugar and begin to mash beans till desired consistence. Begin to add liquid back into beans till it is as thick as you like it. Remember, they thicken when cool, so add enough liquid to compensate.