wrap in anonymous function to avoid ns pollution