replaced S with magS