checking for the existence of the window function isn't working. discarding that functionality for now.