replaced code