factor out slug test