First working GPU version