view and edit buttons working