it sort of compiles now - basic discovery implementation in progress