adding detail views and popup dialog