remove dumplication function when testing use Frame or not