Initial code with discovery

Initial code to discovery