This is the basic idea.