helper classes (copied from another -unreleased- infra project)