added inspect(foo) function