add support for media ID

close #4
cleanup