wrote function to return list of programs based on search checks -- still needs some debugging