renamed detect to black