Added more fuctionality to the activity