Updated main function in julia.