added show/edit item logic and template