use instance if availale when doing edge detection