refactor groups#show into transaction scripts