use endl instead of \n to flush output and actually see something