Add defectrate helper
Don't hardcode defect rate