implemented and finnished checksum