Different algorithm implementation. Body selector added.