added thumbnail download function