has all code inside main function