add proc to window