Put code in main function for faster execution.