change basic example to accept key as an argument to test different keys on the same port