revised isbn parsing method