added tests.sh and made sud.cpp read from standard in