add show detail function