begin to implement a Gilespi algorithm