added pdb write