spec leaf detection