parsing contact strings