update code with fb's changes