code works except for gpu stuff because no cuda capable device is detected.