improve pohe code