added thumbnail functionality