working on views, not functioning properly