Little change to the code to make it work.