new serial algorithm, transition to new GPU implementation