this looks like something we should liberate into a library at a later date.