recursive to get all the modules