a alternative implementation for pp_panhost