Slavery was mostly an urban phenomenon with most of the slaves working in households.[12] The "Farmers Law" of the 7th/8th centuries and the 10th century "Book of the Prefect" deals with slavery.[13] Slaves were not allowed to marry until it was legalized by emperor Alexios I Komnenos in 1095.