added some better printing
better assertions
merged