wrote code to replace labels with teivalues