passing hostname as argument; bugfixing