to optimize the DetailsActivity