cleaning up backup logic