How social capital and knowledge affect innovation