added maxsamp to the portsf library