separating out homeview functions