adding the new fixed code