edited fred.c