more flexible test bed (accepts cmd-line params)