moved mdi subclass function to switchbar file