added edit card db function