fixed contact name problems and added tests