added window functions and in WIndow function