merge code into single activity.