kmt helper for p4