implement router#swap to swap views