update to trains.c and makefile