moved common view to separate file