Added DOF limit retrieval and random sample