Strings in flat space and pp waves from ${\cal N}=4$ Super Yang Mills