Complex sentence: At the same time he had commitment to Islam.He spends his preliminary studies in Qazvin City.
Split into simpler sentences: At the same time he had a commitment to Islam. He spent his preliminary studies in Qazvin City.