(wip) A more correct version of the whole process