Synthesis, structure and optical properties of different dimensional organic-inorganic perovskites