altered top-down.c to reflect top-down.h