The basic algorithm