setup self-executing function

setup self-executing function