Added tesh.sh - the base functions