move the code for searching and displaying nets into a separate file