added frame.h and frame.cpp