added substring function and primality test
added substring function and prime test