Electrophoretic deposition of hydroxyapatite coatings on AZ31 magnesium substrate for biodegradable implant applications