implement several frame type and rafactoring