Made the function self executing