added some logic
added media