cleanup code part 2