add frameInit function in base.c