save before ionic implementation