replaced code sections