separate model and dom