added host and port as arguments