change window object visibility to public