The rise and fall of the medieval Islamic Empire