implmenting a functional shell in c.