Subtracted 1 from termination to make code more compact