separated home view logic