fixed modified code design