improve window & add test.rb