created function for media items, and used it on various pages