Added functionality to change text and image during displaying