cleaned up gpu example code