added center frame in window method