Fully working version with checkum verifying tests