remove redundant object in code example