worked on accessing database stuff in view