updated card creation to return the created cards as json