added main method
remove window listener