Merge two update script to one