removed write_url as Andy suggested