A more complex javascript example