updated code for checking pending and completed changes