add thumbnail functionality