fixed main, removed assert with a more descriptive output