add id collision handling

a simple while loop that updates the id of a newly posted story