first part of business logic for upgrading modules