I butchered your code but got the entropy out of it