It looks like (hard to tell without the indentation) you are creating stuff inside a function which returns something, but you never assign that something to a variable. In the meantime, everything inside the function has gone out of scope and disappeared.