initial import from sharppbrt