this looks very similar to code in the marketplace, could we move code around and re-use it?