made some changes to code for fbviewcontroller