adding a gpu implementation