map view and table view functionality