Create p96.ml

Based on your suggestions, improved the implementation. I didn't really shorten the code as I want to show the different states as explicit as possible.