Added loop for cardChange