fixed base case tail compression, needs to be negative not 0
updated main testing code for tail compression