wrapped main code in anonymous function and instantly calling it.