adapted codebookfgbg from my previous personal stuff, passing frames but doing nothing