changed and debugged algo to fit to paper. started fingerprint merging