add swapping helper for views