Very functional version.