added option to collapse in portrait but expand in landscape