Finish coding for main
Finish and test