implement model window