adds show and edit functionality