use endl instead of \n