added new frame.c and frame.h