refactor vhost example