Changed functinos to allow other selectors.
Test fix.
Self-review