moved from js fiddle, modified todo.js