copied utility classes / setup from other p60 extensions (thanks guys)