Minutiae based fingerprint matching algorithm