cuda version gives correct answer; need to add timing