modified implementation of updating views when rotation happens