modify window call back function in window context
codes in window context