update code to reflect comment