Optimisation of anodising electrolyte for magnesium alloy AZ31 and characteristics of anodic film