changed hook triggers to window from body