helper functions in a tested, benchmarked package