And a working version