What Was Hamas Thinking? Understanding the Events in Gaza