[UPDATE] incremental algorithm