replaced called if activity is restored using a bundle
further refactoring