adding checks
restore part 1
Part 2