Adding a working version with TODOs