Full version (work in progress)