add the functionality to center the windows