add function for getting title and image