added refactored activity class.