refactor views and read data from forms