state machine (FIXME borken initial state, corrupts the rest.)
initialize memory on gpu for sane results