add final code

project4-final complete all function