added Euclidean distant function. added algrith of Luis for Get instances of database.cursor iterates. Everything still needs testing