randomize
main, sum bugfix
several tests