my modified code