removed all calls to thrust (708ms)