modified code design