Update package algorithm