refactored ptslayer to link directly to model