fixed networkstack read and write bugs
added logic to digital card