set up state machine with aasm