write request outside handler