refactor and implement B-frame skip