consolidate functions, add the bookmarklet