added preliminary discovery code