refactor and label change in view