separate functions for window boundaries