jquery existange checking moved to separate method
coding style improvements
find method divided into 3 smaller methods to avoid too much complexity