+ added didSelectSegmentAtIndex delegate method
+ small changes to the view switching behaviour