before algorithm change