added view factories and adding detail view