add function to compute window power