refactor to allow custom bg