created another function for rewriteId in utils to make create work