Working on finishing algorithm: Update