refactor to abstract BBC specific code out