Influence of the composition of hybrid perovskites on their performance in solar cells