wrap marklet in anonymous function to encapsulate