implemented algorithm to detect landmarks