modified create problem algorithm