added code for bookmarklet