reimplemented equiv() for better scalability + some tests