updatse to automate the whole process