moved pie and user view to different files