add window functions and its (simple) tests