refactoring on MageTab Loading