TODO: include security and checksum