added more framework code for window functions