converted to use typedef

Program now uses typedef of double