done PAM algorithm with python.