part2.c some fixes