init moved to window load