updated for gpu fork