reading function and checksum check added for all functions