add prepare for create and update