decoding old program

Looking at taking some parts of the code