updating with correct cuda math