abstracting controller logic from window view