added some changes for the usage of persistentType