Max, we really need code, so we can see where exactly the undefined occurs. Can you do that? I mean skeleton code.