cleaning up + write_args()