refactor views

refactor to simplify views