add reset and skeleton code.