added api interaction for cards