cleanup of the code part2