Modified cat.c for milestone2