updateing portrait and landscape modes