separate data and view