add code from facebook's youtube tutorial