window abstration refactor