added some pending changes logic