Strings in flat space and pp waves from Script N = 4 Super Yang Mills