remove unnecessary window scope