can magnesium improve memory function?