update main and model