activity was refactored using methods