done init and reset and buildUrl function