added pre-modified code