added assertions for window sizing