This is a basic implementation that works.