extends algorithm