first draft of gpu solver done.