added show and edit functionality