add more parameter to control the program. FInished 2 algorithm. 2 left go o