Part2 finished

found variable checking work