adding thumbnail functions