changed function for getModules() to work with business logic