EBGS rewrite with marek comment