improve update method and add port/host/scheme to config