fixed some bugs in generate. Still errors left though
cleand output
fixed checking possibilities, added functions to print vectors (ugly but works)