refactoring, added retrieveAnActivity