improved performance

updated selectors so a smaller part of the dom is traversed