refactor to haproxy struct