update for cuda