restructured the KPT class